import React from 'react';
import EditableTimer from './EditableTimer';
class EditableTimerList extends React.Component {
    render() {
        const timers=this.props.timers.map((timer)=>(
            // console.log("timer....",timer)
                <EditableTimer
                    key={timer.id}
                    id={timer.id}
                    title= {timer.title}
                    project={timer.project}
                    elapsed={timer.elapsed}
                    runningSince={timer.runningSince}
                    editFormOpen={timer.editFormOpen}
                    onFormSubmit={this.props.onFormSubmit}
                    onTrashClick={this.props.onTrashClick}
                    onStartClick={this.props.onStartClick}
                    onStopClick={this.props.onStopClick}
                />
            )
        )
        return(
            <div className="">
                <p>计时器列表</p>
                <div>
                    {timers}
                </div>
            </div>
        )
    }
}
export default EditableTimerList;